.class public abstract Lcom/netease/newsreader/view/ImageViewer;
.super Landroid/widget/ViewSwitcher;
.source "ImageViewer.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;,
        Lcom/netease/newsreader/view/ImageViewer$OnItemListener;
    }
.end annotation


# static fields
.field private static final DOWN:I = 0x1

.field private static final DRAG:I = 0x2

.field public static final INVALID_VALUE:I = -0x1

.field private static final NONE:I


# instance fields
.field private mActivePointerId:I

.field private mAppendViewChangeListener:Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;

.field private mArrayList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private mBitmapCache:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Object;",
            "Ljava/lang/ref/WeakReference",
            "<",
            "Landroid/graphics/Bitmap;",
            ">;>;"
        }
    .end annotation
.end field

.field private mCurrent:I

.field private mDensity:F

.field private mLastX:F

.field private mLastY:F

.field private mNext:I

.field private mNextAppendView:Landroid/widget/FrameLayout;

.field private mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

.field private mPreAppendView:Landroid/widget/FrameLayout;

.field private mRect:Landroid/graphics/Rect;

.field private mScroller:Landroid/widget/Scroller;

.field private mTouchSlop:I

.field private mTouchState:I

.field private mVertical:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    const/4 v1, -0x1

    .line 76
    invoke-direct {p0, p1}, Landroid/widget/ViewSwitcher;-><init>(Landroid/content/Context;)V

    .line 36
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    .line 38
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 40
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    .line 46
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    .line 48
    const/4 v0, 0x0

    iput v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    .line 62
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    .line 66
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    .line 77
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->init(Landroid/content/Context;)V

    .line 78
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v1, -0x1

    .line 71
    invoke-direct {p0, p1, p2}, Landroid/widget/ViewSwitcher;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 36
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    .line 38
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 40
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    .line 46
    iput v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    .line 48
    const/4 v0, 0x0

    iput v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    .line 62
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    .line 66
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    .line 72
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->init(Landroid/content/Context;)V

    .line 73
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/view/ImageViewer;)Landroid/widget/Scroller;
    .locals 1
    .parameter

    .prologue
    .line 60
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/view/ImageViewer;)I
    .locals 1
    .parameter

    .prologue
    .line 318
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v0

    return v0
.end method

.method static synthetic access$2(Lcom/netease/newsreader/view/ImageViewer;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 467
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->offsetView(I)V

    return-void
.end method

.method static synthetic access$3(Lcom/netease/newsreader/view/ImageViewer;)I
    .locals 1
    .parameter

    .prologue
    .line 322
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v0

    return v0
.end method

.method private addCache(Ljava/lang/Object;Landroid/graphics/Bitmap;)V
    .locals 2
    .parameter "key"
    .parameter "bitmap"

    .prologue
    .line 598
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    new-instance v1, Ljava/lang/ref/WeakReference;

    invoke-direct {v1, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    invoke-virtual {v0, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 599
    return-void
.end method

.method private callChangeAppend(I)V
    .locals 3
    .parameter "status"

    .prologue
    .line 546
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendView()Landroid/widget/FrameLayout;

    move-result-object v0

    .line 547
    .local v0, appendView:Landroid/widget/FrameLayout;
    if-nez v0, :cond_1

    .line 574
    :cond_0
    :goto_0
    return-void

    .line 550
    :cond_1
    const/4 v2, 0x0

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->getChildAt(I)Landroid/view/View;

    move-result-object v1

    .line 552
    .local v1, view:Landroid/view/View;
    if-eqz v1, :cond_2

    .line 553
    packed-switch p1, :pswitch_data_0

    .line 571
    :cond_2
    :pswitch_0
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mAppendViewChangeListener:Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;

    if-eqz v2, :cond_0

    .line 572
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mAppendViewChangeListener:Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;

    invoke-interface {v2, p1, v1}, Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;->onChange(ILandroid/view/View;)V

    goto :goto_0

    .line 553
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method private clearCache()V
    .locals 1

    .prologue
    .line 606
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    .line 607
    return-void
.end method

.method private drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z
    .locals 3
    .parameter "canvas"
    .parameter "childView"
    .parameter "drawingTime"
    .parameter "newStart"

    .prologue
    .line 174
    iget-boolean v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v2, :cond_0

    invoke-virtual {p2}, Landroid/view/View;->getTop()I

    move-result v2

    :goto_0
    sub-int v0, p5, v2

    .line 179
    .local v0, offset:I
    iget-boolean v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v2, :cond_1

    .line 180
    invoke-virtual {p2, v0}, Landroid/view/View;->offsetTopAndBottom(I)V

    .line 188
    :goto_1
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/ViewSwitcher;->drawChild(Landroid/graphics/Canvas;Landroid/view/View;J)Z

    move-result v1

    .line 190
    .local v1, ret:Z
    iget-boolean v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v2, :cond_2

    .line 191
    neg-int v2, v0

    invoke-virtual {p2, v2}, Landroid/view/View;->offsetTopAndBottom(I)V

    .line 195
    :goto_2
    return v1

    .line 174
    .end local v0           #offset:I
    .end local v1           #ret:Z
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getLeft()I

    move-result v2

    goto :goto_0

    .line 182
    .restart local v0       #offset:I
    :cond_1
    invoke-virtual {p2, v0}, Landroid/view/View;->offsetLeftAndRight(I)V

    goto :goto_1

    .line 193
    .restart local v1       #ret:Z
    :cond_2
    neg-int v2, v0

    invoke-virtual {p2, v2}, Landroid/view/View;->offsetLeftAndRight(I)V

    goto :goto_2
.end method

.method private getAppendSize()I
    .locals 2

    .prologue
    .line 348
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendView()Landroid/widget/FrameLayout;

    move-result-object v0

    .line 349
    .local v0, appendView:Landroid/view/View;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    :goto_0
    return v1

    :cond_0
    invoke-virtual {v0}, Landroid/view/View;->getHeight()I

    move-result v1

    goto :goto_0
.end method

.method private getAppendView()Landroid/widget/FrameLayout;
    .locals 1

    .prologue
    .line 353
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 354
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    .line 358
    :goto_0
    return-object v0

    .line 355
    :cond_0
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 356
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    goto :goto_0

    .line 358
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private getBitmapByIndex(I)Landroid/graphics/Bitmap;
    .locals 1
    .parameter "i"

    .prologue
    .line 648
    if-ltz p1, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lt p1, v0, :cond_1

    .line 649
    :cond_0
    const/4 v0, 0x0

    .line 651
    :goto_0
    return-object v0

    :cond_1
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    invoke-direct {p0, p1, v0}, Lcom/netease/newsreader/view/ImageViewer;->getBitmapInternal(ILjava/lang/Object;)Landroid/graphics/Bitmap;

    move-result-object v0

    goto :goto_0
.end method

.method private getBitmapInternal(ILjava/lang/Object;)Landroid/graphics/Bitmap;
    .locals 2
    .parameter "position"
    .parameter "path"

    .prologue
    .line 610
    invoke-direct {p0, p2}, Lcom/netease/newsreader/view/ImageViewer;->getCache(Ljava/lang/Object;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 612
    .local v0, bitmap:Landroid/graphics/Bitmap;
    invoke-virtual {p0, p2, v0}, Lcom/netease/newsreader/view/ImageViewer;->isCacheChanged(Ljava/lang/Object;Landroid/graphics/Bitmap;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 613
    invoke-virtual {p0, p1, p2, v0}, Lcom/netease/newsreader/view/ImageViewer;->getBitmap(ILjava/lang/Object;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 614
    invoke-direct {p0, p2, v0}, Lcom/netease/newsreader/view/ImageViewer;->addCache(Ljava/lang/Object;Landroid/graphics/Bitmap;)V

    .line 616
    :cond_0
    return-object v0
.end method

.method private getCache(Ljava/lang/Object;)Landroid/graphics/Bitmap;
    .locals 2
    .parameter "key"

    .prologue
    .line 593
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/ref/WeakReference;

    .line 594
    .local v0, r:Ljava/lang/ref/WeakReference;,"Ljava/lang/ref/WeakReference<Landroid/graphics/Bitmap;>;"
    if-nez v0, :cond_0

    const/4 v1, 0x0

    :goto_0
    return-object v1

    :cond_0
    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/graphics/Bitmap;

    goto :goto_0
.end method

.method private getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;
    .locals 1
    .parameter "view"

    .prologue
    .line 620
    if-nez p1, :cond_0

    .line 621
    const/4 v0, 0x0

    .line 623
    :goto_0
    return-object v0

    :cond_0
    const v0, 0x7f0c00af

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/view/ImageViewTouch;

    goto :goto_0
.end method

.method private getRectEnd()I
    .locals 1

    .prologue
    .line 323
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->right:I

    goto :goto_0
.end method

.method private getRectSize()I
    .locals 1

    .prologue
    .line 315
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    invoke-virtual {v0}, Landroid/graphics/Rect;->height()I

    move-result v0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    invoke-virtual {v0}, Landroid/graphics/Rect;->width()I

    move-result v0

    goto :goto_0
.end method

.method private getRectStart()I
    .locals 1

    .prologue
    .line 319
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->top:I

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->left:I

    goto :goto_0
.end method

.method private hideAppendView()V
    .locals 2

    .prologue
    .line 585
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendView()Landroid/widget/FrameLayout;

    move-result-object v0

    .line 586
    .local v0, appendView:Landroid/view/View;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-nez v1, :cond_0

    .line 587
    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 588
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->invalidate()V

    .line 590
    :cond_0
    return-void
.end method

.method private init(Landroid/content/Context;)V
    .locals 5
    .parameter "context"

    .prologue
    const/4 v4, -0x1

    const/4 v3, -0x2

    .line 81
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v2

    iget v2, v2, Landroid/util/DisplayMetrics;->density:F

    iput v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mDensity:F

    .line 82
    invoke-static {p1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v0

    .line 83
    .local v0, configuration:Landroid/view/ViewConfiguration;
    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result v2

    iput v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchSlop:I

    .line 84
    new-instance v2, Landroid/widget/Scroller;

    invoke-direct {v2, p1}, Landroid/widget/Scroller;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    .line 85
    new-instance v2, Landroid/widget/FrameLayout;

    invoke-direct {v2, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    .line 86
    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    invoke-direct {v1, v4, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    .line 87
    .local v1, lp:Landroid/widget/FrameLayout$LayoutParams;
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v2, v1}, Landroid/widget/FrameLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 88
    new-instance v2, Landroid/widget/FrameLayout;

    invoke-direct {v2, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    .line 89
    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    .end local v1           #lp:Landroid/widget/FrameLayout$LayoutParams;
    invoke-direct {v1, v4, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    .line 90
    .restart local v1       #lp:Landroid/widget/FrameLayout$LayoutParams;
    iget-object v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v2, v1}, Landroid/widget/FrameLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 92
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->hideAppendView()V

    .line 94
    return-void
.end method

.method private isNextShow()Z
    .locals 1

    .prologue
    .line 331
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v0

    if-gez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private isNextValid()Z
    .locals 2

    .prologue
    .line 335
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private isPreShow()Z
    .locals 1

    .prologue
    .line 327
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private layoutAppend(Landroid/view/View;ZIIII)V
    .locals 3
    .parameter "appendView"
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    .line 121
    invoke-virtual {p1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v0

    neg-int v0, v0

    invoke-virtual {p1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v1

    const/4 v2, 0x0

    invoke-virtual {p1, p3, v0, v1, v2}, Landroid/view/View;->layout(IIII)V

    .line 122
    return-void
.end method

.method private logViewRect(Landroid/view/View;)V
    .locals 1
    .parameter "view"

    .prologue
    .line 199
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    .line 200
    .local v0, r:Landroid/graphics/Rect;
    invoke-virtual {p1, v0}, Landroid/view/View;->getHitRect(Landroid/graphics/Rect;)V

    .line 203
    return-void
.end method

.method private measureAppend(Landroid/view/View;II)V
    .locals 6
    .parameter "appendView"
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    const/4 v3, 0x0

    .line 132
    move-object v0, p0

    move-object v1, p1

    move v2, p2

    move v4, p3

    move v5, v3

    invoke-virtual/range {v0 .. v5}, Lcom/netease/newsreader/view/ImageViewer;->measureChildWithMargins(Landroid/view/View;IIII)V

    .line 133
    return-void
.end method

.method private offsetView(I)V
    .locals 9
    .parameter "offset"

    .prologue
    .line 468
    if-nez p1, :cond_0

    .line 514
    :goto_0
    return-void

    .line 472
    :cond_0
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v3

    .line 473
    .local v3, lastIsPreShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v2

    .line 474
    .local v2, lastIsNextShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->willToNext()Z

    move-result v4

    .line 476
    .local v4, lastWillToNext:Z
    iget-boolean v7, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v7, :cond_3

    .line 477
    iget-object v7, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v8, v7, Landroid/graphics/Rect;->top:I

    add-int/2addr v8, p1

    iput v8, v7, Landroid/graphics/Rect;->top:I

    .line 478
    iget-object v7, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v8, v7, Landroid/graphics/Rect;->bottom:I

    add-int/2addr v8, p1

    iput v8, v7, Landroid/graphics/Rect;->bottom:I

    .line 484
    :goto_1
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v1

    .line 485
    .local v1, isPreShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    .line 486
    .local v0, isNextShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->willToNext()Z

    move-result v6

    .line 488
    .local v6, willToNext:Z
    const/4 v5, -0x1

    .line 489
    .local v5, status:I
    if-eqz v1, :cond_7

    .line 490
    if-nez v3, :cond_5

    .line 491
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->prepareNext()Z

    move-result v7

    if-eqz v7, :cond_4

    const/4 v5, 0x0

    .line 509
    :cond_1
    :goto_2
    const/4 v7, -0x1

    if-eq v5, v7, :cond_2

    .line 510
    invoke-direct {p0, v5}, Lcom/netease/newsreader/view/ImageViewer;->callChangeAppend(I)V

    .line 513
    :cond_2
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->invalidate()V

    goto :goto_0

    .line 480
    .end local v0           #isNextShow:Z
    .end local v1           #isPreShow:Z
    .end local v5           #status:I
    .end local v6           #willToNext:Z
    :cond_3
    iget-object v7, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v8, v7, Landroid/graphics/Rect;->left:I

    add-int/2addr v8, p1

    iput v8, v7, Landroid/graphics/Rect;->left:I

    .line 481
    iget-object v7, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    iget v8, v7, Landroid/graphics/Rect;->right:I

    add-int/2addr v8, p1

    iput v8, v7, Landroid/graphics/Rect;->right:I

    goto :goto_1

    .line 492
    .restart local v0       #isNextShow:Z
    .restart local v1       #isPreShow:Z
    .restart local v5       #status:I
    .restart local v6       #willToNext:Z
    :cond_4
    const/4 v5, 0x2

    goto :goto_2

    .line 493
    :cond_5
    if-nez v4, :cond_6

    if-eqz v6, :cond_6

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v7

    if-eqz v7, :cond_6

    .line 494
    const/4 v5, 0x1

    goto :goto_2

    .line 495
    :cond_6
    if-nez v6, :cond_1

    if-eqz v4, :cond_1

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v7

    if-eqz v7, :cond_1

    .line 496
    const/4 v5, 0x0

    goto :goto_2

    .line 498
    :cond_7
    if-eqz v0, :cond_1

    .line 499
    if-nez v2, :cond_9

    .line 500
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->prepareNext()Z

    move-result v7

    if-eqz v7, :cond_8

    const/4 v5, 0x3

    :goto_3
    goto :goto_2

    .line 501
    :cond_8
    const/4 v5, 0x5

    goto :goto_3

    .line 502
    :cond_9
    if-nez v4, :cond_a

    if-eqz v6, :cond_a

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v7

    if-eqz v7, :cond_a

    .line 503
    const/4 v5, 0x4

    goto :goto_2

    .line 504
    :cond_a
    if-nez v6, :cond_1

    if-eqz v4, :cond_1

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v7

    if-eqz v7, :cond_1

    .line 505
    const/4 v5, 0x3

    goto :goto_2
.end method

.method private onMove(I)V
    .locals 7
    .parameter "delta"

    .prologue
    const/high16 v6, 0x4000

    .line 362
    if-nez p1, :cond_0

    .line 387
    :goto_0
    return-void

    .line 365
    :cond_0
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    .line 366
    .local v0, isNextShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v1

    .line 368
    .local v1, isPreShow:Z
    const/4 v2, 0x0

    .line 369
    .local v2, offset:I
    if-nez v0, :cond_4

    if-gtz p1, :cond_1

    if-eqz v1, :cond_4

    if-gez p1, :cond_4

    .line 370
    :cond_1
    if-gez p1, :cond_3

    .line 371
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v3

    neg-int v3, v3

    invoke-static {v3, p1}, Ljava/lang/Math;->max(II)I

    move-result p1

    .line 375
    :goto_1
    move v2, p1

    .line 385
    :cond_2
    :goto_2
    invoke-direct {p0, v2}, Lcom/netease/newsreader/view/ImageViewer;->offsetView(I)V

    goto :goto_0

    .line 373
    :cond_3
    int-to-float v3, p1

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v4

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v5

    sub-int/2addr v4, v5

    int-to-float v4, v4

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v5

    int-to-float v5, v5

    div-float/2addr v4, v5

    div-float/2addr v4, v6

    mul-float/2addr v3, v4

    float-to-int p1, v3

    goto :goto_1

    .line 376
    :cond_4
    if-nez v1, :cond_2

    if-ltz p1, :cond_5

    if-eqz v0, :cond_2

    if-lez p1, :cond_2

    .line 377
    :cond_5
    if-lez p1, :cond_6

    .line 378
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v3

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v4

    sub-int/2addr v3, v4

    invoke-static {v3, p1}, Ljava/lang/Math;->min(II)I

    move-result p1

    .line 382
    :goto_3
    move v2, p1

    goto :goto_2

    .line 380
    :cond_6
    int-to-float v3, p1

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v4

    int-to-float v4, v4

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v5

    int-to-float v5, v5

    div-float/2addr v4, v5

    div-float/2addr v4, v6

    mul-float/2addr v3, v4

    float-to-int p1, v3

    goto :goto_3
.end method

.method private onSecondaryPointerUp(Landroid/view/MotionEvent;)V
    .locals 4
    .parameter "ev"

    .prologue
    .line 287
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v3

    invoke-interface {v3, p1}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerIndex(Landroid/view/MotionEvent;)I

    move-result v2

    .line 288
    .local v2, pointerIndex:I
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v3

    invoke-interface {v3, p1, v2}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerId(Landroid/view/MotionEvent;I)I

    move-result v1

    .line 289
    .local v1, pointerId:I
    iget v3, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    if-ne v1, v3, :cond_0

    .line 293
    if-nez v2, :cond_1

    const/4 v0, 0x1

    .line 294
    .local v0, newPointerIndex:I
    :goto_0
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v3

    invoke-interface {v3, p1, v0}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getX(Landroid/view/MotionEvent;I)F

    move-result v3

    iput v3, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    .line 295
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v3

    invoke-interface {v3, p1, v0}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getY(Landroid/view/MotionEvent;I)F

    move-result v3

    iput v3, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    .line 296
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v3

    invoke-interface {v3, p1, v0}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerId(Landroid/view/MotionEvent;I)I

    move-result v3

    iput v3, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    .line 298
    .end local v0           #newPointerIndex:I
    :cond_0
    return-void

    .line 293
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private onUp()V
    .locals 11

    .prologue
    const/16 v5, 0x1f4

    const/high16 v3, 0x4348

    const/4 v1, 0x0

    .line 390
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 391
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->willToNext()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 392
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v2

    .line 393
    .local v2, start:I
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v0

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendSize()I

    move-result v3

    add-int/2addr v0, v3

    sub-int v4, v0, v2

    .line 394
    .local v4, dy:I
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    move v3, v1

    invoke-virtual/range {v0 .. v5}, Landroid/widget/Scroller;->startScroll(IIIII)V

    .line 395
    new-instance v0, Lcom/netease/newsreader/view/ImageViewer$1;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/ImageViewer$1;-><init>(Lcom/netease/newsreader/view/ImageViewer;)V

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->post(Ljava/lang/Runnable;)Z

    .line 465
    .end local v2           #start:I
    .end local v4           #dy:I
    :cond_0
    :goto_0
    return-void

    .line 411
    :cond_1
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v2

    .line 412
    .restart local v2       #start:I
    int-to-float v0, v2

    div-float v10, v0, v3

    .line 413
    .local v10, incrementPerMs:F
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v7

    .line 414
    .local v7, startTime:J
    new-instance v5, Lcom/netease/newsreader/view/ImageViewer$2;

    move-object v6, p0

    move v9, v2

    invoke-direct/range {v5 .. v10}, Lcom/netease/newsreader/view/ImageViewer$2;-><init>(Lcom/netease/newsreader/view/ImageViewer;JIF)V

    invoke-virtual {p0, v5}, Lcom/netease/newsreader/view/ImageViewer;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 426
    .end local v2           #start:I
    .end local v7           #startTime:J
    .end local v10           #incrementPerMs:F
    :cond_2
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 427
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->willToNext()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 428
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v2

    .line 429
    .restart local v2       #start:I
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v0

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendSize()I

    move-result v3

    add-int/2addr v0, v3

    neg-int v0, v0

    sub-int v4, v0, v2

    .line 430
    .restart local v4       #dy:I
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    move v3, v1

    invoke-virtual/range {v0 .. v5}, Landroid/widget/Scroller;->startScroll(IIIII)V

    .line 431
    new-instance v0, Lcom/netease/newsreader/view/ImageViewer$3;

    invoke-direct {v0, p0}, Lcom/netease/newsreader/view/ImageViewer$3;-><init>(Lcom/netease/newsreader/view/ImageViewer;)V

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 447
    .end local v2           #start:I
    .end local v4           #dy:I
    :cond_3
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v9

    .line 448
    .local v9, bottom:I
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v0

    sub-int/2addr v0, v9

    int-to-float v0, v0

    div-float v10, v0, v3

    .line 449
    .restart local v10       #incrementPerMs:F
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v7

    .line 450
    .restart local v7       #startTime:J
    new-instance v5, Lcom/netease/newsreader/view/ImageViewer$4;

    move-object v6, p0

    invoke-direct/range {v5 .. v10}, Lcom/netease/newsreader/view/ImageViewer$4;-><init>(Lcom/netease/newsreader/view/ImageViewer;JIF)V

    invoke-virtual {p0, v5}, Lcom/netease/newsreader/view/ImageViewer;->post(Ljava/lang/Runnable;)Z

    goto :goto_0
.end method

.method private prepareNext()Z
    .locals 8

    .prologue
    .line 517
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v2

    .line 518
    .local v2, isPreShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    .line 520
    .local v0, isNextShow:Z
    if-eqz v2, :cond_4

    .line 521
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->showAppendView()V

    .line 526
    :cond_0
    :goto_0
    if-eqz v2, :cond_5

    iget v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    add-int/lit8 v5, v5, -0x1

    :goto_1
    iput v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    .line 527
    iget v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    if-ltz v5, :cond_1

    iget v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCount()I

    move-result v6

    if-lt v5, v6, :cond_2

    .line 528
    :cond_1
    const/4 v5, -0x1

    iput v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    .line 530
    :cond_2
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v1

    .line 532
    .local v1, isNextValid:Z
    if-eqz v1, :cond_3

    .line 533
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getNextView()Landroid/view/View;

    move-result-object v5

    invoke-direct {p0, v5}, Lcom/netease/newsreader/view/ImageViewer;->getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;

    move-result-object v3

    .line 534
    .local v3, nextView:Lcom/netease/newsreader/view/ImageViewTouch;
    if-eqz v3, :cond_3

    .line 535
    iget v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    invoke-direct {p0, v5}, Lcom/netease/newsreader/view/ImageViewer;->getBitmapByIndex(I)Landroid/graphics/Bitmap;

    move-result-object v5

    invoke-virtual {p0, v3, v5}, Lcom/netease/newsreader/view/ImageViewer;->setViewBitmap(Lcom/netease/newsreader/view/ImageViewTouch;Landroid/graphics/Bitmap;)V

    .line 536
    if-eqz v2, :cond_3

    .line 537
    invoke-virtual {v3}, Lcom/netease/newsreader/view/ImageViewTouch;->getMapRect()Landroid/graphics/RectF;

    move-result-object v4

    .line 538
    .local v4, r:Landroid/graphics/RectF;
    const/4 v5, 0x0

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v6

    int-to-float v6, v6

    invoke-virtual {v4}, Landroid/graphics/RectF;->height()F

    move-result v7

    sub-float/2addr v6, v7

    invoke-virtual {v3, v5, v6}, Lcom/netease/newsreader/view/ImageViewTouch;->postTranslateCenter(FF)I

    .line 542
    .end local v3           #nextView:Lcom/netease/newsreader/view/ImageViewTouch;
    .end local v4           #r:Landroid/graphics/RectF;
    :cond_3
    return v1

    .line 522
    .end local v1           #isNextValid:Z
    :cond_4
    if-eqz v0, :cond_0

    .line 523
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->showAppendView()V

    goto :goto_0

    .line 526
    :cond_5
    iget v5, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    add-int/lit8 v5, v5, 0x1

    goto :goto_1
.end method

.method private removeCache(Ljava/lang/Object;)V
    .locals 1
    .parameter "key"

    .prologue
    .line 602
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mBitmapCache:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 603
    return-void
.end method

.method private setCurrentInternal(I)V
    .locals 3
    .parameter "current"

    .prologue
    const/4 v2, -0x1

    .line 634
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    if-ne v0, p1, :cond_0

    .line 645
    :goto_0
    return-void

    .line 637
    :cond_0
    if-ltz p1, :cond_1

    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCount()I

    move-result v0

    if-lt p1, v0, :cond_2

    .line 638
    :cond_1
    iput v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 642
    :goto_1
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/Scroller;->forceFinished(Z)V

    .line 643
    iput v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    .line 644
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->performItemSelected()V

    goto :goto_0

    .line 640
    :cond_2
    iput p1, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    goto :goto_1
.end method

.method private showAppendView()V
    .locals 2

    .prologue
    .line 577
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendView()Landroid/widget/FrameLayout;

    move-result-object v0

    .line 578
    .local v0, appendView:Landroid/view/View;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-eqz v1, :cond_0

    .line 579
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 580
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->invalidate()V

    .line 582
    :cond_0
    return-void
.end method

.method private willToNext()Z
    .locals 3

    .prologue
    .line 339
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendSize()I

    move-result v1

    div-int/lit8 v0, v1, 0x2

    .line 340
    .local v0, size:I
    if-gtz v0, :cond_0

    .line 341
    const/high16 v1, 0x41f0

    iget v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mDensity:F

    mul-float/2addr v1, v2

    float-to-int v0, v1

    .line 344
    :cond_0
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v1

    invoke-static {v1}, Ljava/lang/Math;->abs(I)I

    move-result v1

    if-le v1, v0, :cond_1

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_1
    const/4 v1, 0x0

    goto :goto_0
.end method


# virtual methods
.method protected dispatchDraw(Landroid/graphics/Canvas;)V
    .locals 13
    .parameter "canvas"

    .prologue
    .line 137
    invoke-super {p0, p1}, Landroid/widget/ViewSwitcher;->dispatchDraw(Landroid/graphics/Canvas;)V

    .line 139
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v12

    .line 140
    .local v12, isPreShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v10

    .line 141
    .local v10, isNextShow:Z
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendSize()I

    move-result v9

    .line 143
    .local v9, appendSize:I
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getAppendView()Landroid/widget/FrameLayout;

    move-result-object v2

    .line 145
    .local v2, appendView:Landroid/view/View;
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v0, :cond_1

    if-eqz v2, :cond_1

    invoke-virtual {v2}, Landroid/view/View;->getVisibility()I

    move-result v0

    if-nez v0, :cond_1

    .line 146
    if-lez v9, :cond_1

    if-nez v12, :cond_0

    if-eqz v10, :cond_1

    .line 147
    :cond_0
    if-eqz v12, :cond_3

    .line 148
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getDrawingTime()J

    move-result-wide v3

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v0

    sub-int v5, v0, v9

    move-object v0, p0

    move-object v1, p1

    invoke-direct/range {v0 .. v5}, Lcom/netease/newsreader/view/ImageViewer;->drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z

    .line 154
    :cond_1
    :goto_0
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getNextView()Landroid/view/View;

    move-result-object v5

    .line 156
    .local v5, nextView:Landroid/view/View;
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextValid()Z

    move-result v11

    .line 157
    .local v11, isNextValid:Z
    if-eqz v12, :cond_4

    if-eqz v11, :cond_4

    .line 158
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getDrawingTime()J

    move-result-wide v6

    .line 159
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v0

    sub-int/2addr v0, v9

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectSize()I

    move-result v1

    sub-int v8, v0, v1

    move-object v3, p0

    move-object v4, p1

    .line 158
    invoke-direct/range {v3 .. v8}, Lcom/netease/newsreader/view/ImageViewer;->drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z

    .line 163
    :cond_2
    :goto_1
    return-void

    .line 149
    .end local v5           #nextView:Landroid/view/View;
    .end local v11           #isNextValid:Z
    :cond_3
    if-eqz v10, :cond_1

    .line 150
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getDrawingTime()J

    move-result-wide v3

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v5

    move-object v0, p0

    move-object v1, p1

    invoke-direct/range {v0 .. v5}, Lcom/netease/newsreader/view/ImageViewer;->drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z

    goto :goto_0

    .line 160
    .restart local v5       #nextView:Landroid/view/View;
    .restart local v11       #isNextValid:Z
    :cond_4
    if-eqz v10, :cond_2

    if-eqz v11, :cond_2

    .line 161
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getDrawingTime()J

    move-result-wide v6

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectEnd()I

    move-result v0

    add-int v8, v0, v9

    move-object v3, p0

    move-object v4, p1

    invoke-direct/range {v3 .. v8}, Lcom/netease/newsreader/view/ImageViewer;->drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z

    goto :goto_1
.end method

.method protected drawChild(Landroid/graphics/Canvas;Landroid/view/View;J)Z
    .locals 6
    .parameter "canvas"
    .parameter "child"
    .parameter "drawingTime"

    .prologue
    .line 167
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrentView()Landroid/view/View;

    move-result-object v0

    if-ne v0, p2, :cond_0

    .line 168
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->getRectStart()I

    move-result v5

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-wide v3, p3

    invoke-direct/range {v0 .. v5}, Lcom/netease/newsreader/view/ImageViewer;->drawOffsetChild(Landroid/graphics/Canvas;Landroid/view/View;JI)Z

    move-result v0

    .line 170
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/ViewSwitcher;->drawChild(Landroid/graphics/Canvas;Landroid/view/View;J)Z

    move-result v0

    goto :goto_0
.end method

.method protected abstract getBitmap(ILjava/lang/Object;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 682
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    .line 683
    const/4 v0, 0x0

    .line 685
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    goto :goto_0
.end method

.method public getCurrent()I
    .locals 1

    .prologue
    .line 689
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    return v0
.end method

.method public getNext()I
    .locals 1

    .prologue
    .line 693
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    return v0
.end method

.method public hasInterpreterTouch()Z
    .locals 1

    .prologue
    .line 301
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v0

    if-nez v0, :cond_0

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected isCacheChanged(Ljava/lang/Object;Landroid/graphics/Bitmap;)Z
    .locals 1
    .parameter "key"
    .parameter "cached"

    .prologue
    .line 669
    if-eqz p2, :cond_0

    invoke-virtual {p2}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public isVertical()Z
    .locals 1

    .prologue
    .line 723
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    return v0
.end method

.method protected onFinishInflate()V
    .locals 3

    .prologue
    .line 98
    invoke-super {p0}, Landroid/widget/ViewSwitcher;->onFinishInflate()V

    .line 99
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrentView()Landroid/view/View;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

    .line 100
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getNextView()Landroid/view/View;

    move-result-object v1

    const/4 v2, 0x4

    invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V

    .line 101
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrentView()Landroid/view/View;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/netease/newsreader/view/ImageViewer;->getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;

    move-result-object v0

    .line 102
    .local v0, child:Lcom/netease/newsreader/view/ImageViewTouch;
    invoke-virtual {v0, p0}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageViewer(Lcom/netease/newsreader/view/ImageViewer;)V

    .line 104
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getNextView()Landroid/view/View;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/netease/newsreader/view/ImageViewer;->getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;

    move-result-object v0

    .line 105
    invoke-virtual {v0, p0}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageViewer(Lcom/netease/newsreader/view/ImageViewer;)V

    .line 106
    return-void
.end method

.method protected onLayout(ZIIII)V
    .locals 7
    .parameter "changed"
    .parameter "left"
    .parameter "top"
    .parameter "right"
    .parameter "bottom"

    .prologue
    .line 110
    invoke-super/range {p0 .. p5}, Landroid/widget/ViewSwitcher;->onLayout(ZIIII)V

    .line 112
    if-eqz p1, :cond_0

    .line 113
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->getHitRect(Landroid/graphics/Rect;)V

    .line 114
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    move-object v0, p0

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    invoke-direct/range {v0 .. v6}, Lcom/netease/newsreader/view/ImageViewer;->layoutAppend(Landroid/view/View;ZIIII)V

    .line 115
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    move-object v0, p0

    move v2, p1

    move v3, p2

    move v4, p3

    move v5, p4

    move v6, p5

    invoke-direct/range {v0 .. v6}, Lcom/netease/newsreader/view/ImageViewer;->layoutAppend(Landroid/view/View;ZIIII)V

    .line 117
    :cond_0
    return-void
.end method

.method protected onMeasure(II)V
    .locals 1
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    .line 126
    invoke-super {p0, p1, p2}, Landroid/widget/ViewSwitcher;->onMeasure(II)V

    .line 127
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    invoke-direct {p0, v0, p1, p2}, Lcom/netease/newsreader/view/ImageViewer;->measureAppend(Landroid/view/View;II)V

    .line 128
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    invoke-direct {p0, v0, p1, p2}, Lcom/netease/newsreader/view/ImageViewer;->measureAppend(Landroid/view/View;II)V

    .line 129
    return-void
.end method

.method public onTouch(Landroid/view/MotionEvent;)Z
    .locals 14
    .parameter "event"

    .prologue
    const/4 v13, 0x0

    const/4 v12, -0x1

    const/high16 v11, 0x4000

    const/4 v10, 0x2

    const/4 v8, 0x1

    .line 213
    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    if-eq v9, v12, :cond_0

    iget-object v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v9}, Landroid/widget/Scroller;->isFinished()Z

    move-result v9

    if-nez v9, :cond_2

    .line 214
    :cond_0
    iput v10, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    .line 215
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v9

    iput v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    .line 216
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v9

    iput v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    move v5, v8

    .line 283
    :cond_1
    :goto_0
    return v5

    .line 220
    :cond_2
    const/4 v5, 0x0

    .line 221
    .local v5, ret:Z
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v9

    invoke-interface {v9, p1}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getAction(Landroid/view/MotionEvent;)I

    move-result v0

    .line 222
    .local v0, action:I
    packed-switch v0, :pswitch_data_0

    :pswitch_0
    goto :goto_0

    .line 224
    :pswitch_1
    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    .line 225
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v8

    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    .line 226
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v8

    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    .line 227
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isNextShow()Z

    move-result v8

    if-nez v8, :cond_3

    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->isPreShow()Z

    move-result v8

    if-eqz v8, :cond_4

    .line 228
    :cond_3
    const/4 v5, 0x1

    goto :goto_0

    .line 230
    :cond_4
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrentView()Landroid/view/View;

    move-result-object v8

    invoke-direct {p0, v8}, Lcom/netease/newsreader/view/ImageViewer;->getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;

    move-result-object v4

    .line 231
    .local v4, imageViewTouch:Lcom/netease/newsreader/view/ImageViewTouch;
    if-eqz v4, :cond_5

    invoke-virtual {v4}, Lcom/netease/newsreader/view/ImageViewTouch;->isReady()Z

    move-result v8

    if-nez v8, :cond_1

    .line 232
    :cond_5
    const/4 v5, 0x1

    .line 235
    goto :goto_0

    .line 237
    .end local v4           #imageViewTouch:Lcom/netease/newsreader/view/ImageViewTouch;
    :pswitch_2
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->onSecondaryPointerUp(Landroid/view/MotionEvent;)V

    .line 238
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v9

    invoke-interface {v9, p1}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerCount(Landroid/view/MotionEvent;)F

    move-result v9

    cmpl-float v9, v9, v11

    if-nez v9, :cond_1

    .line 239
    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    goto :goto_0

    .line 243
    :pswitch_3
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v9

    invoke-interface {v9, p1}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerCount(Landroid/view/MotionEvent;)F

    move-result v9

    cmpl-float v9, v9, v11

    if-nez v9, :cond_1

    .line 244
    invoke-static {}, Lcom/netease/newsreader/util/VersionCompatibilityUtil;->getMotionEventUtil()Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;

    move-result-object v9

    invoke-interface {v9, p1, v13}, Lcom/netease/newsreader/util/VersionCompatibilityUtil$MotionEventUtil;->getPointerId(Landroid/view/MotionEvent;I)I

    move-result v9

    iput v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    .line 245
    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    if-ne v9, v8, :cond_1

    .line 246
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->hideAppendView()V

    goto :goto_0

    .line 251
    :pswitch_4
    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    if-ne v9, v8, :cond_7

    .line 252
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v6

    .line 253
    .local v6, x:F
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v7

    .line 254
    .local v7, y:F
    iget v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    sub-float v2, v6, v8

    .line 255
    .local v2, deltaX:F
    iget v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    sub-float v3, v7, v8

    .line 257
    .local v3, deltaY:F
    invoke-static {v2}, Ljava/lang/Math;->abs(F)F

    move-result v8

    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchSlop:I

    int-to-float v9, v9

    cmpl-float v8, v8, v9

    if-gtz v8, :cond_6

    invoke-static {v3}, Ljava/lang/Math;->abs(F)F

    move-result v8

    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchSlop:I

    int-to-float v9, v9

    cmpl-float v8, v8, v9

    if-lez v8, :cond_7

    .line 258
    :cond_6
    iput v10, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    .line 262
    .end local v2           #deltaX:F
    .end local v3           #deltaY:F
    .end local v6           #x:F
    .end local v7           #y:F
    :cond_7
    iget v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    if-ne v8, v10, :cond_8

    .line 263
    iget-boolean v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eqz v8, :cond_9

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v8

    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    sub-float v1, v8, v9

    .line 265
    .local v1, delta:F
    :goto_1
    float-to-int v8, v1

    invoke-direct {p0, v8}, Lcom/netease/newsreader/view/ImageViewer;->onMove(I)V

    .line 266
    const/4 v5, 0x1

    .line 268
    .end local v1           #delta:F
    :cond_8
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v8

    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    .line 269
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v8

    iput v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastY:F

    goto/16 :goto_0

    .line 263
    :cond_9
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v8

    iget v9, p0, Lcom/netease/newsreader/view/ImageViewer;->mLastX:F

    sub-float v1, v8, v9

    goto :goto_1

    .line 273
    :pswitch_5
    iget v8, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    if-ne v8, v10, :cond_a

    .line 274
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->onUp()V

    .line 276
    :cond_a
    iput v12, p0, Lcom/netease/newsreader/view/ImageViewer;->mActivePointerId:I

    .line 277
    iput v13, p0, Lcom/netease/newsreader/view/ImageViewer;->mTouchState:I

    goto/16 :goto_0

    .line 222
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_5
        :pswitch_4
        :pswitch_5
        :pswitch_0
        :pswitch_3
        :pswitch_2
    .end packed-switch
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "event"

    .prologue
    .line 208
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->onTouch(Landroid/view/MotionEvent;)Z

    move-result v0

    return v0
.end method

.method protected performItemClick()V
    .locals 2

    .prologue
    .line 751
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

    if-eqz v0, :cond_0

    .line 752
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrent()I

    move-result v1

    invoke-interface {v0, v1}, Lcom/netease/newsreader/view/ImageViewer$OnItemListener;->onItemClick(I)V

    .line 754
    :cond_0
    return-void
.end method

.method protected performItemSelected()V
    .locals 2

    .prologue
    .line 757
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

    if-eqz v0, :cond_0

    .line 758
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrent()I

    move-result v1

    invoke-interface {v0, v1}, Lcom/netease/newsreader/view/ImageViewer$OnItemListener;->onItemSelected(I)V

    .line 760
    :cond_0
    return-void
.end method

.method public refreshCurrent()V
    .locals 3

    .prologue
    const/4 v2, -0x1

    .line 707
    iget v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    if-ne v1, v2, :cond_0

    .line 713
    :goto_0
    return-void

    .line 710
    :cond_0
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 711
    .local v0, c:I
    iput v2, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 712
    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->setCurrent(I)V

    goto :goto_0
.end method

.method public setAppendViewChangeListener(Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;)V
    .locals 2
    .parameter "listener"

    .prologue
    .line 727
    iput-object p1, p0, Lcom/netease/newsreader/view/ImageViewer;->mAppendViewChangeListener:Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;

    .line 728
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->removeAllViews()V

    .line 729
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v1}, Landroid/widget/FrameLayout;->removeAllViews()V

    .line 730
    if-eqz p1, :cond_1

    .line 731
    const/4 v1, 0x1

    invoke-interface {p1, v1}, Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;->createView(Z)Landroid/view/View;

    move-result-object v0

    .line 732
    .local v0, view:Landroid/view/View;
    if-eqz v0, :cond_0

    .line 733
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mPreAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v1, v0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 736
    :cond_0
    const/4 v1, 0x0

    invoke-interface {p1, v1}, Lcom/netease/newsreader/view/ImageViewer$AppendViewChangeListener;->createView(Z)Landroid/view/View;

    move-result-object v0

    .line 737
    if-eqz v0, :cond_1

    .line 738
    iget-object v1, p0, Lcom/netease/newsreader/view/ImageViewer;->mNextAppendView:Landroid/widget/FrameLayout;

    invoke-virtual {v1, v0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 742
    .end local v0           #view:Landroid/view/View;
    :cond_1
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->requestLayout()V

    .line 743
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->invalidate()V

    .line 744
    return-void
.end method

.method public setCurrent(I)V
    .locals 3
    .parameter "current"

    .prologue
    .line 697
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    if-ne v0, p1, :cond_0

    .line 704
    :goto_0
    return-void

    .line 700
    :cond_0
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewer;->setCurrentInternal(I)V

    .line 701
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getCurrentView()Landroid/view/View;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->getImageViewTouch(Landroid/view/View;)Lcom/netease/newsreader/view/ImageViewTouch;

    move-result-object v1

    .line 702
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    const/4 v2, -0x1

    if-eq v0, v2, :cond_1

    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    invoke-direct {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->getBitmapByIndex(I)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 701
    :goto_1
    invoke-virtual {p0, v1, v0}, Lcom/netease/newsreader/view/ImageViewer;->setViewBitmap(Lcom/netease/newsreader/view/ImageViewTouch;Landroid/graphics/Bitmap;)V

    goto :goto_0

    .line 702
    :cond_1
    const/4 v0, 0x0

    goto :goto_1
.end method

.method public setList(Ljava/util/List;I)V
    .locals 1
    .parameter "list"
    .parameter "position"

    .prologue
    .line 673
    invoke-direct {p0}, Lcom/netease/newsreader/view/ImageViewer;->clearCache()V

    .line 674
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 675
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mArrayList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 676
    const/4 v0, -0x1

    iput v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mCurrent:I

    .line 677
    invoke-virtual {p0, p2}, Lcom/netease/newsreader/view/ImageViewer;->setCurrent(I)V

    .line 679
    return-void
.end method

.method public setOnItemListener(Lcom/netease/newsreader/view/ImageViewer$OnItemListener;)V
    .locals 0
    .parameter "onItemClickListener"

    .prologue
    .line 747
    iput-object p1, p0, Lcom/netease/newsreader/view/ImageViewer;->mOnItemClickListener:Lcom/netease/newsreader/view/ImageViewer$OnItemListener;

    .line 748
    return-void
.end method

.method public setVertical(Z)V
    .locals 1
    .parameter "vertival"

    .prologue
    .line 716
    iget-boolean v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    if-eq v0, p1, :cond_0

    .line 717
    iput-boolean p1, p0, Lcom/netease/newsreader/view/ImageViewer;->mVertical:Z

    .line 718
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->requestLayout()V

    .line 720
    :cond_0
    return-void
.end method

.method protected setViewBitmap(Lcom/netease/newsreader/view/ImageViewTouch;Landroid/graphics/Bitmap;)V
    .locals 1
    .parameter "view"
    .parameter "bitmap"

    .prologue
    .line 627
    if-nez p1, :cond_0

    .line 631
    :goto_0
    return-void

    .line 630
    :cond_0
    const/4 v0, 0x1

    invoke-virtual {p1, p2, v0}, Lcom/netease/newsreader/view/ImageViewTouch;->setImageBitmapResetBase(Landroid/graphics/Bitmap;Z)V

    goto :goto_0
.end method

.method public showNext()V
    .locals 2

    .prologue
    .line 306
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    const/4 v1, -0x1

    if-eq v0, v1, :cond_0

    .line 307
    iget v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mNext:I

    invoke-direct {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->setCurrentInternal(I)V

    .line 308
    invoke-super {p0}, Landroid/widget/ViewSwitcher;->showNext()V

    .line 309
    iget-object v0, p0, Lcom/netease/newsreader/view/ImageViewer;->mRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/ImageViewer;->getHitRect(Landroid/graphics/Rect;)V

    .line 310
    invoke-virtual {p0}, Lcom/netease/newsreader/view/ImageViewer;->getNextView()Landroid/view/View;

    move-result-object v0

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 312
    :cond_0
    return-void
.end method
